﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class FrontEnd_Blocks_FriendList : System.Web.UI.UserControl
{
    public List<BLO.User> friends;
    public String[] friendIDs;

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            String blogOwner = Request.Params.Get("ID");
            if (blogOwner == null)
            {
                blogOwner = Session["LoginUser"].ToString();
            }

            // Get friend ID.
            friendIDs = new String[] { "HuyNVK", "HienTT", "ThaoNX", "ThanhCV" };
            friends = new List<BLO.User>();

            // Get friend list.
            for (int i = 0; i < friendIDs.Length; i++)
            {
                if (friendIDs[i] != blogOwner)
                {
                    try
                    {
                        friends.Add(BLO.User.GetUser(friendIDs[i]));
                    }
                    catch (Exception ex)
                    {
                        Util.Log.LogError(ex.StackTrace);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            Util.Log.LogError(ex.StackTrace);
        }
    }
}
